const {
  request
} = require('./request')

function login(data) {
  return request({
    url: '/login',
    method: 'POST',
    data
  })
}

function postCode() {
  return request({
    method: 'POST',
  }, {
    url: 'http://newstu.1000phone.net/fx/api/login/captcha',
  })
}

function postMolyApp(data) {
  return request({
    method: 'POST',
    data,
  }, {
    url: 'https://i.mly.app/reply',
    header: {
      'Api-Key': 'n7eb5px0s32kwb9i',
      "Api-Secret": 'ul4hp0s4'
    }
  })
}

module.exports = {
  login,
  postCode,
  postMolyApp
}